package com.designpatterns.listener;

public class ListenerPatternTest {
	public static void main(String[] args) {
		DataReader dataReader = new DataReader();
		
		// Set data reader listener.
		dataReader.setDataReaderListener(new DataReaderListener() {
			@Override
			public void beforeReading() {
				System.out.println("Open progress dialog UI.");
			}
			
			@Override
			public void afterReading() {
				System.out.println("Close progress dialog UI.");
			}
		});
		
		// Start to read data.
		dataReader.read();
	}
}
